<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script type="text/javascript">
    function foo (fn) {
      var books = [{id: 1, bname: '水浒传'}]
      fn(books)
    }

    // 回调函数：空手进去 满载而归
    foo(function (data) {
      console.log(data)
    })
  </script>
</body>
</html>